﻿using Mobileterminal.Common;
using Mobileterminal.Dtos;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Mobileterminal.Forms.Zyy
{
    public partial class AddUsagecs : UIEditForm
    {
        public AddUsagecs()
        {
            InitializeComponent();
            Loada();
        }

        private void AddUsagecs_Load(object sender, EventArgs e)
        {

        }
       
        private void uiDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
        private async Task Loada()
        {

            var url = "https://localhost:7224/api/Items/GetItem";
            var json = await HttpClientHelper.ClientAsync("GET", url);
            var result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<List<ItemsDTO>>>(json);
            if (result?.Code == 200)
            {

                uiDataGridView1.DataSource = result.Data;

            }

        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            MessageBox.Show("成功");
        }
    }
}

